*	The main procedure is as follows:
Sub CallFieldValues()
Dim str1 As String
Dim str2 As String
Dim str3 As String
Dim str4 As String

'Specify the data source for the member information
str1 = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=C:\LunarSociety\OLS1.mdb;"
   
'Specify a table within the record source
str2 = "MEMBERS"

'Specify a criterion for record retrieval
str3 = "City"
str4 = "Portland"

'Call the procedure to retrieve a Portland member

FieldValues str1, str2, str3, str4

End Sub
*	The subprocedure is as follows:
'Generic procedure to construct a single-record recordset,
'and then display its contents
Sub FieldValues(str1 As String, str2 As String, _
     str3 As String, str4 As String)
    
Dim cnxn As ADODB.Connection
Dim rst1 As ADODB.Recordset
Dim str5 As String
Dim fld1 As ADODB.Field

'Open the Connection
Set cnxn = New ADODB.Connection
cnxn.Open str1

'Create recordset reference, and set its properties
Set rst1 = New ADODB.Recordset
rst1.ActiveConnection = cnxn
str5 = "SELECT * FROM " & str2 & " WHERE " & _
     str3 & " = '" & str4 & "'"
    
rst1.Open str5, , , , adCmdText

'Display field values for first qualifying record
For Each fld1 In rst1.Fields
     Debug.Print fld1.Name, fld1.Value
Next fld1

'Clean up before exiting
Set fld1 = Nothing
Set rst1 = Nothing

End Sub
